﻿@using e_commerce.Models

@{
    var user = Session["ADMIN"] as AdminUser;
}

<header>
    <div class="header-left">
    </div>
    <div class="header-right">
        <span class="admin-user">管理员:@user.Name,欢迎您</span>
        <a class="admin-user" id="logout" href="#"><img style="height:22px;width:22px;" src="~/Image/icon_exit.png"/>&nbsp;退出</a>
     </div>
    <script type="text/javascript">
        $("#logout").click(function () {
            $.ajax({
                url: "/BackAccount/AdminLogout",
                method: "post",
                success: function (data) {
                    window.location.href = "http://localhost:47275/";
                },
                error: function () {
                    alert("退出失败");
                }
            })
        })
    </script>
</header>



